package mapping

import (
	"pay/model"
	"pay/model/entity"
)

// FeePlanGroupObjectsEntityToDto entity data transfer
func FeePlanGroupObjectsEntityToDto(feePlanGroupObjects []*entity.FeePlanGroupObject) []*model.FeePlanGroupObjectInfo {
	out := make([]*model.FeePlanGroupObjectInfo, 0, len(feePlanGroupObjects))
	for _, c := range feePlanGroupObjects {
		out = append(out, FeePlanGroupObjectEntityToDto(c))
	}
	return out
}

// FeePlanGroupObjectEntityToDto entity data transfer
func FeePlanGroupObjectEntityToDto(e *entity.FeePlanGroupObject) *model.FeePlanGroupObjectInfo {
	return &model.FeePlanGroupObjectInfo{

		Id: e.Id,

		Detail: e.Detail,

		GroupId: e.GroupId,

		ObjectId: e.ObjectId,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
